#!/usr/bin/python

import sys

i = 0
for line in sys.stdin:
	feat,counts = line.split('\t')
	c0 = counts.split()[0]
	c1 = counts.split()[1]
	print "0%d\t%s"%(i,c0)
	print "1%d\t%s"%(i,c1)
	print "2%d\t%d"%(i,1)
	i = (i+1)%10
